The present invention relates to an improved process for the production of esters by reacting dicarboxylic acids or anhydrides (typically maleic anhydride or phthalic anhydride) with methanol, in the presence of a catalyst consisting of an alkyl benzene sulfonic acid with an alkyl radical containing from 8 to 16 carbon atoms, preferably from 10 to 13 carbon atoms.
The production of dimethyl maleate (DMM) from maleic anhydride (MAN) and methanol has received special attention and interest due to the increasing use of DMM as feedstock for the production of derivatives such as gamma butyrolactone (GBL), tetrahydrofuran (THF) and butanediol (BDO).
Various methods for production of DMM have been described in the literature.
The esterification of MAN proceeds stepwise via a monoesterification reaction, with production of monomethyl maleate (MMM), and an esterification reaction with production of DMM, according to the following equations:
Monoesterification 
Esterifications 
Other esterifications, like the production of dimethylphthalate from phthalic anhydride and methanol, proceed in the same way.
These reactions are normally carried out in two separate reactors.
The monoesterification reaction is normally effected non catalytically, while the esterification reaction is carried out in the presence of a catalyst in order to accelerate the reaction.
Because the esterification is an equilibrium reaction, various methods have been described in the literature in which the equilibrium is displaced by removal of water in order to allow a high yield, high conversion rate production of the ester.
In the esterifications, the most widely used catalysts are strong homogeneous acid compounds, such as sulfuric acid or sulfonic acids (typically p-toluene sulfonic acid) as suggested in British Patents 1,173,089 and 1,262,645.
Other patents, such as European Patent Publications 009,886 and 158,499 suggest the use of alkyl sulfonic acids having formula RSO3H.
The above catalysts, however, present several disadvantages in the preparation of an ester like DMM, which must meet critical purity specifications.
In fact, in order to recover the DMM produced, the catalyst must be removed.
Neutralisation with alkali, followed by washing with water, is a standard method employed by the esterification industry for the above removal.
The neutralisation and washing steps, however, produce significant quantities of waste water, where besides the catalyst, salts of acid compounds such as maleic anhydride or MMM in traces are present, as well as DMM which is somewhat soluble in water, resulting in a loss of process efficiency and major environmental problems.
Moreover, since the acid catalyst is destroyed in the neutralisation, its consumption penalizes production costs.
According to the present invention, to avoid the problems that arise from the neutralisation it has been thought to vaporize and distill the ester product by separating it from a residue containing the acid catalyst which is bound to be recycled to the esterification, as an integral part of the process object of the invention
However, such procedure results non-satisfactory in case standard acid catalysts are employed in the esterification.
In fact, the aforementioned catalysts tend to form sulfonate esters which derive from the esterification of the acid catalyst obtained by reacting it with the alcohol reagent.
No matter whether the sulfonic esters are distilled with DMM or are subject to thermal decomposition, they release sulfur compounds which contaminate the ester product.
In case the DMM produced is used as a feed for the production of GBL, THF and BDO, sulfur impurities shall be absent, or limited to a fraction of a part per million (say 0.5 ppm. or less).
In fact, the presence of sulfur in DMM would result in rapid poisoning of the hydrogenation catalyst employed in the conversion of DMM into GEL, THF and BDO.
Furthermore, because of the formation of sulfonic esters and their contamination either with metals resulting from corrosion or with heavy organic by-products, the standard acid catalysts have shown to rapidly lose their activity and as a result of that to be only partly reusable if an ester vaporization and distillation process is employed.
To avoid the disadvantages associated with the use of standard homogeneous acid catalysts, various methods have been described.
In WO 88/00937 DAVY McKEE described the production of esters of maleic anhydride, preferably diethylmaleate, using a solid ion exchange resin containing SO3H groups.
Although feasible, the use of a heterogeneous catalyst complicates the process because of the complex design the multistage esterification system is based on, and in principle it cannot grant a completely sulfur free product. This ought to be ascribed to the tendency the resins have to lose part of their active sulfonic groups at the start and in the course of the operation, with the associated gradual decrease in their catalytic activity.
To completely overcome the abovementioned drawbacks and complications, the present invention provides a process for producing esters from a dicarboxylic acid or anhydride that react with methanol in the presence of a homogeneous type catalyst, characterized by the fact that the amount of sulfur in the product meets the specifications required by the further processing of the abovementioned ester product consisting of hydrogenations and also by the fact that the catalyst can be recovered and reused in the process causing no major enviromental problems.
The abovementioned results are obtained by using an alkylbenzene sulfonic acid having an alkyl radical containing from 8 to 16 carbon atoms, preferably from 10 to 13 carbon atoms (i.e. : n-decylbenzene sulfonic acid, n-undecylbenzene sulfonic acid, n-dodecylbenzene sulfonic acid, n-tridecylbenzene sulfonic acid)as esterification catalyst.
Mixtures of alkylbenzene sulfonic acids containing alkyl chains formed by between 8 and 16 carbon atoms are also adequate.
Similar esterification catalysts have been suggested by UNION CARBIDE in E.P. 0521 488 A2.
However, it can be noted that the above mentioned patent owned by UNION CARBIDE concerns the esterification of monocarboxylic acids having from 1 to 4 carbon atoms (acetic acid, propionic acid, butyric acid and alikes) with alcohols having from 2 to 8 carbon atoms.
Furthermore the process described by UNION CARBIDE concerns the production of esters which vaporize together with water in the esterification.
Instead, the process object of the present invention applies to dicarboxylic acids or anhydrides esterified with an alcohol only containing one carbon atom (i.e. methanol). The product of the esterification-DMM, dimethylphthalate and alikes-does not vaporize during the process.
Furthermore, in the process object of the present invention the esterification is performed in a reactor consisting of a multi-tray column where the liquid phase containing the mono and diester mixture flows downwards from each tray coming to contact with a progressively drier upflowing stream of vapors in countercurrent, which remove the water formed in the reaction from the liquid phase.
The esterification reaction is carried out at operating conditions (i.e. number of trays, retention time, operating pressure and temperature) which are selected so as to cause all of the MAN and MMM to be converted into DMM with high selectivity.